From: Josef Schlehofer Date: Tue, 17 Jun 2025 06:06:18 +0000 (+0200) Subject: batmand: update to 2022-12-31 and simplify Makefile X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=6aed281d791d3834284d5798c3ccd2df50c40fba;p=feed%2Frouting.git batmand: update to 2022-12-31 and simplify Makefile Patches: - 0001-Allow-one-to-disable-forking-to-background-in-debug_.patch is included in the upstream [1] - 0002-batmand-Add-missing-string.h-include.patch is included in the upstream [2] Makefile is simplified, reordered to be able to move this package to packages feed. [1] https://git.open-mesh.org/batmand.git/commit/?id=2f62b17d4132f82c4716b672101eb7faa916192a [2] https://git.open-mesh.org/batmand.git/commit/linux?id=aca79f595d20ed8ed5efa204c87f30174d5b4228 Signed-off-by: Josef Schlehofer --- diff --git a/batmand/Makefile b/batmand/Makefile index 42362a1..8978c6c 100644 --- a/batmand/Makefile +++ b/batmand/Makefile @@ -8,32 +8,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batmand +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.open-mesh.org/batmand.git -PKG_REV:=b67a7087b51d7a5e90d27ac39116d1f57257c86e -PKG_VERSION:=1440 -PKG_RELEASE:=2 -PKG_LICENSE:=GPL-2.0 +PKG_MIRROR_HASH:=bb8b74bea9f70ae91b3ef3ef089aa3149e3f5335b6e1db31ea7870d899b0a176 +PKG_SOURCE_VERSION:=2f62b17d4132f82c4716b672101eb7faa916192a +PKG_SOURCE_DATE:=2022-12-31 -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_MIRROR_HASH:=ceb8e0e399f79b1b663594fcf9642e1efc40e696a7604daf709c77da9b6ec52f -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_LICENSE:=GPL-2.0-only +PKG_MAINTAINER:=Corinna "Elektra" Aichele PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk define Package/batmand - URL:=https://www.open-mesh.org/ - MAINTAINER:=Corinna "Elektra" Aichele SECTION:=net CATEGORY:=Network SUBMENU:=Routing and Redirection - DEPENDS:=+libpthread +kmod-tun TITLE:=B.A.T.M.A.N. layer 3 routing daemon + URL:=https://www.open-mesh.org/ + DEPENDS:=+libpthread +kmod-tun endef define Package/batmand/description @@ -41,8 +37,8 @@ B.A.T.M.A.N. layer 3 routing daemon endef MAKE_FLAGS += \ - EXTRA_CFLAGS='-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE' \ - REVISION="$(PKG_REV)" \ + EXTRA_CFLAGS='-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_SOURCE_VERSION)\" -D_GNU_SOURCE' \ + REVISION="$(PKG_SOURCE_VERSION)" \ CC="$(TARGET_CC)" \ UNAME="Linux" \ batmand diff --git a/batmand/patches/0001-Allow-one-to-disable-forking-to-background-in-debug_.patch b/batmand/patches/0001-Allow-one-to-disable-forking-to-background-in-debug_.patch deleted file mode 100644 index 3eaeb5d..0000000 --- a/batmand/patches/0001-Allow-one-to-disable-forking-to-background-in-debug_.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Sven Eckelmann <> -Date: Sun, 1 Dec 2013 14:39:00 +0100 -Subject: Allow one to disable forking to background in debug_mode 0 - ---- - posix/init.c | 19 ++++++++++++++----- - 1 file changed, 14 insertions(+), 5 deletions(-) - ---- a/posix/init.c -+++ b/posix/init.c -@@ -44,6 +44,7 @@ - #define IOCSETDEV 1 - - int8_t stop; -+int no_detach = 0; - - - -@@ -159,6 +160,7 @@ void apply_init_args( int argc, char *ar - {"purge-timeout", required_argument, 0, 'q'}, - {"disable-aggregation", no_argument, 0, 'x'}, - {"disable-client-nat", no_argument, 0, 'z'}, -+ {"no-detach", no_argument, 0, 'D'}, - {0, 0, 0, 0} - }; - -@@ -169,7 +171,7 @@ void apply_init_args( int argc, char *ar - if ( strstr( SOURCE_VERSION, "-" ) != NULL ) - printf( "WARNING: You are using the unstable batman branch. If you are interested in *using* batman get the latest stable release !\n" ); - -- while ( ( optchar = getopt_long( argc, argv, "a:A:bcd:hHio:g:p:r:s:vV", long_options, &option_index ) ) != -1 ) { -+ while ( ( optchar = getopt_long( argc, argv, "a:A:bcd:hHio:g:p:r:s:vVD", long_options, &option_index ) ) != -1 ) { - - switch ( optchar ) { - -@@ -381,6 +383,11 @@ void apply_init_args( int argc, char *ar - found_args++; - break; - -+ case 'D': -+ no_detach = 1; -+ found_args++; -+ break; -+ - case 'h': - default: - usage(); -@@ -539,12 +546,14 @@ void apply_init_args( int argc, char *ar - /* daemonize */ - if (debug_level == 0) { - -- if (my_daemon() < 0) { -+ if (!no_detach) { -+ if (my_daemon() < 0) { - -- printf("Error - can't fork to background: %s\n", strerror(errno)); -- restore_defaults(); -- exit(EXIT_FAILURE); -+ printf("Error - can't fork to background: %s\n", strerror(errno)); -+ restore_defaults(); -+ exit(EXIT_FAILURE); - -+ } - } - - openlog("batmand", LOG_PID, LOG_DAEMON); diff --git a/batmand/patches/0002-batmand-Add-missing-string.h-include.patch b/batmand/patches/0002-batmand-Add-missing-string.h-include.patch deleted file mode 100644 index 1630379..0000000 --- a/batmand/patches/0002-batmand-Add-missing-string.h-include.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Sven Eckelmann -Date: Fri, 23 May 2025 11:15:53 +0200 -Subject: batmand: Add missing string.h include - -The build failed because various string functions couldn't be found. This -happened because the indirect include of string.h is now gone in musl -1.2.5. - -Signed-off-by: Sven Eckelmann - ---- a/hna.c -+++ b/hna.c -@@ -27,6 +27,7 @@ - - #include - #include -+#include - #include - - ---- a/linux/kernel.c -+++ b/linux/kernel.c -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - #include "../os.h" - #include "../batman.h" ---- a/linux/route.c -+++ b/linux/route.c -@@ -29,6 +29,7 @@ - #include /* ifr_if, ifr_tun */ - #include - #include -+#include - #include - - #include "../os.h" ---- a/linux/tun.c -+++ b/linux/tun.c -@@ -32,6 +32,7 @@ - #include - #include - #include /* system() */ -+#include - #include /* WEXITSTATUS */ - - #include "../os.h"